package shape;


import java.awt.geom.Point2D;

import shape.selector.Selector;


public class ModelRectangle extends Rectangle implements ModelShape {

	private Selector	selector;


	public ModelRectangle() {
		super();
	}


	public ModelRectangle(Point2D position, double base, double height) {
		super(position, base, height);
	}


	@Override
	public boolean checkContains(Point2D point) {
		return selector.checkSelected(point);
	}


	@Override
	public void setSelector(Selector selector) {
		this.selector = selector;
		this.selector.setTarget(this);
	}


	@Override
	public Rectangle getBoundingBox() {
		return new Rectangle(super.position, super.base, super.height);
	}

}
